home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / XLIB06.ZIP / XTEXT.H < prev    next >
C/C++ Source or Header  |  1993-09-13  |  2KB  |  92 lines

  1. /*-----------------------------------------------------------------------
  2. ;
  3. ; XTEXT - header file
  4. ;
  5. ;
  6. ;
  7. ; ****** XLIB - Mode X graphics library                ****************
  8. ; ******                                               ****************
  9. ; ****** Written By Themie Gouthas                     ****************
  10. ;
  11. ; egg@dstos3.dsto.gov.au
  12. ; teg@bart.dsto.gov.au
  13. ;
  14. ;  Terminology & notes:
  15. ;         VRAM ==   Video RAM
  16. ;         SRAM ==   System RAM
  17. ;         X coordinates are in pixels unless explicitly stated
  18. ;
  19. ;-----------------------------------------------------------------------*/
  20.  
  21. #ifndef _XTEXT_H_
  22. #define _XTEXT_H_
  23.  
  24.  
  25. #define FONT_8x8  0
  26. #define FONT_8x15 1
  27. #define FONT_USER 2
  28.  
  29. /* FUNCTIONS =========================================================== */
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. WORD x_text_init(void);            /* Initialize text functionns  */
  36.  
  37. void x_set_font(
  38.      WORD FontId);             /* Set the font style          */
  39.  
  40. void x_register_userfont(          /* register a user defined font */
  41.      char far *UserFontPtr);
  42.  
  43. unsigned int  x_char_put(          /* Draw a text character using  */
  44.      char ch,                  /* the currently active font    */
  45.      WORD X,
  46.      WORD Y,
  47.      WORD PgOffs,
  48.      WORD Color);
  49.  
  50.  
  51. unsigned int  x_get_char_width(    /* Get the character width      */
  52.      char ch);
  53.  
  54.  
  55. /* the folowing function is from xprintf.c but is included due to its     */
  56. /* close relationship with this module                                    */
  57.  
  58. void x_printf(                          /* formatted text output */
  59.     WORD x,
  60.     WORD y,
  61.     WORD ScrnOffs,
  62.     WORD color,
  63.     char *ln,...);
  64.  
  65. void x_bgprintf(                          /* formatted text output */
  66.     WORD x,
  67.     WORD y,
  68.     WORD ScrnOffs,
  69.     WORD fgcolor,
  70.     WORD bgcolor,
  71.     char *ln,...);
  72.  
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76.  
  77.  
  78. /* VARIABLES =========================================================== */
  79.  
  80. extern BYTE CharHeight;     /* Char height of currently active font        */
  81. extern BYTE CharWidth;      /* Char width of currently active font         */
  82. extern BYTE FirstChar;      /* First char in the curr. active font         */
  83.  
  84. extern BYTE UserCharHeight; /* Char height of currentle regist'd user font */
  85. extern BYTE UserCharWidth;  /* Char height of currentle regist'd user font */
  86. extern BYTE UserFirstChar;  /* First char of the curr. regist'd usera font */
  87.  
  88.  
  89. #endif
  90.  
  91.  
  92.